package oldrouter.gui;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import oldrouter.Router;
import oldrouter.gui.messageSender.ObjectSender;

import java.awt.BorderLayout;

public class SenderPanel extends JPanel implements RouterDependant{
	private static final long serialVersionUID = 7290076850667944730L;
	private ObjectSender objectSender;
	
	public SenderPanel(Router router) {
		setLayout(new BorderLayout(0, 0));
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		add(tabbedPane);
		
		objectSender = new ObjectSender();
		tabbedPane.addTab("Object", null, objectSender, null);
		
		/*MessageSender messageSender = new MessageSender(router);
		tabbedPane.addTab("Message", null, messageSender, null);*/
		
	}

	@Override
	public void routerStarted(Router router) {
		objectSender.setRouter(router);
	}


}
